import request from '@/utils/request'

export const getTaskReportInfoRequest = (start, end) => {
  return request({
    url: `/task-service/task/taskReportInfo/${start}/${end}`,
    method: 'get'
  })
}

// peoplelist 获取
export const getPeopleListRequest = (params) => {
  return request({
    url: '/user-service/user/search',
    method: 'get',
    params
  })
}

// 删除 ？？？
export const delPeopleListRequest = (id) => {
  return request({
    url: `/user-service/user/${id}`,
    method: 'delete'
  })
}

// 数据回显
export const getPeopleDetailRequest = (id) => {
  return request({
    url: `/user-service/user/${id}`,
    method: 'get'
  })
}

// 获取角色列表
export const getRoleListRequest = () => {
  return request({
    url: '/user-service/role',
    method: 'get'
  })
}

// 获取区域列表
export const getRegionListRequest = () => {
  return request({
    url: '/vm-service/region/search',
    method: 'get'
  })
}

// 修改people信息
export const editPeopleInfoRequest = (data, id) => {
  return request({
    url: `/user-service/user/${id}`,
    method: 'put',
    data
  })
}

// userName 筛选
export const choosePeopleRequest = (params) => {
  return request({
    url: '/user-service/user/search',
    method: 'get',
    params
  })
}

// 新增人员
export const addPeopleRequest = (data) => {
  return request({
    url: '/user-service/user',
    method: 'post',
    data
  })
}

// 工作量列表渲染
export const getWorkLoadListRequest = (params) => {
  return request({
    url: '/user-service/user/searchUserWork',
    method: 'get',
    params
  })
}
